]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
searchController: Avoid event.set_source() API
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 25 Feb 2022 12:10:53 +0000 (13:10 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 4 Mar 2022 12:27:34 +0000 (12:27 +0000)
It does not make sense that the target actor is both destinatary
and content of the events being sent, so this API call is going away.

Since the event can be sent entirely unmodified (more so, it will
become immutable/readonly in the future), avoid creating a copy
since it does not matter sending one or other struct.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2216>

js/ui/searchController.js

index ac22439a44b01ae49f225bf88ac69815496fbfb8..ba743a90944814c56e0cdf56732cd7a8daa5dde1 100644 (file)
@@ -228,10 +228,7 @@ var SearchController = GObject.registerClass({
 
     startSearch(event) {
         global.stage.set_key_focus(this._text);
-
-        let synthEvent = event.copy();
-        synthEvent.set_source(this._text);
-        this._text.event(synthEvent, false);
+        this._text.event(event, false);
     }
 
     // the entry does not show the hint